package controller

import (
	"git.oschina.net/goweb/model"
	"html/template"
	"log"
	"net/http"
)

type IndexController struct{}

func (this *IndexController) IndexAction(w http.ResponseWriter, r *http.Request, username string) {
	tmp, err := template.ParseFiles("template/views/index.html")
	if err != nil {
		log.Println(err.Error())
	}

	log.Println("finish...")
	tmp.Execute(w, &model.User{UserName: username})
}
